<?php
/**
 * return css scripts
 *
 * @todo minimize/compress/encode
 *
 * @author kim
 */
class App_View_Helper_Css extends Zend_View_Helper_Abstract
{
    /**
     * @return object
     */
    public function css($file = false)
    {
        if ($file and file_exists(APPLICATION_PATH . '/../public/css/' . $file)) {
            $this->view->headLink()->appendStylesheet(WEB_URL . '/css/' . $file);
        }
        return $this;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return $this->view->headLink()->toString();
    }

}
